import type { XtxGuessInstance } from "@/types/component"
import { ref } from "vue"

// 封装猜你喜欢组合函数
export const useGuessList = () => {
  const guessRef = ref<XtxGuessInstance>()
  // 滚动触底事件
  const onScrolltolower = () => {
    console.log('滚动了')
    guessRef.value?.getMore()
  }

  // 返回ref和事件处理函数
  return  {
    guessRef,
    onScrolltolower
  }
}
